package com.ly.mpayment.persist.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;


/**
 * UpShopPro entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="upshopproduct"

)

public class UpShopProduct  implements java.io.Serializable {


    // Fields

     private String upprouuid;
     private ProvincialInformation provincialInformation;
     private Operators operators;
     private BusinessType businessType;
     private User user;
     private String upfacevalue;
     private BigDecimal discount;
     private String status;
     private Date createtime;
     private Date modifytime;
     private Integer fastchargetype;
     private Integer upfailnum;
     private Integer uptimeinterva;
     private String remark;
     private String productCode;
     private BigDecimal price;//实际折扣
     private BigDecimal discountAmount;//实际金额
     private String productName;
     private String validity;
//     private BigDecimal deduct;//扣款折扣
//     private BigDecimal deductAmount;//扣款金额
     private String cityName;

     //是否转人工 0不是  1人工
     private Boolean artificial;
     //是否压单 1 转压单 0 不压单
     private Boolean pressOrder;
     //重复提交次数
     private Integer repeatNum;


//     private Set<UpgameRecharge> upgameRecharges = new HashSet<UpgameRecharge>(0);
//     private Set<UpProductLog> upProductLogs = new HashSet<UpProductLog>(0);
//     private Set<UpOrder> upOrders = new HashSet<UpOrder>(0);


    // Constructors

    /** default constructor */
    public UpShopProduct() {
    }


    /** full constructor */
    public UpShopProduct(ProvincialInformation provincialInformation,String productName, Operators operators, BusinessType businessType, User user, String upproname, String upfacevalue, BigDecimal discount, String status, Date createtime, Date modifytime, Integer fastchargetype, Integer upfailnum, Integer uptimeinterva, String remark, Set<UpgameRecharge> upgameRecharges, Set<UpProductLog> upProductLogs, Set<UpOrder> upOrders) {
        this.provincialInformation = provincialInformation;
        this.operators = operators;
        this.businessType = businessType;
        this.user = user;
        this.upfacevalue = upfacevalue;
        this.discount = discount;
        this.status = status;
        this.createtime = createtime;
        this.modifytime = modifytime;
        this.fastchargetype = fastchargetype;
        this.upfailnum = upfailnum;
        this.uptimeinterva = uptimeinterva;
        this.remark = remark;
        this.productName = productName;
//        this.upgameRecharges = upgameRecharges;
//        this.upProductLogs = upProductLogs;
//        this.upOrders = upOrders;
    }

    public UpShopProduct(String upprouuid, ProvincialInformation provincialInformation, Operators operators, BusinessType businessType, User user, String upfacevalue, BigDecimal discount, String status, Date createtime, Date modifytime, Integer fastchargetype, Integer upfailnum, Integer uptimeinterva, String remark, String productCode, BigDecimal price, BigDecimal discountAmount, String productName, String validity, String cityName) {
        this.upprouuid = upprouuid;
        this.provincialInformation = provincialInformation;
        this.operators = operators;
        this.businessType = businessType;
        this.user = user;
        this.upfacevalue = upfacevalue;
        this.discount = discount;
        this.status = status;
        this.createtime = createtime;
        this.modifytime = modifytime;
        this.fastchargetype = fastchargetype;
        this.upfailnum = upfailnum;
        this.uptimeinterva = uptimeinterva;
        this.remark = remark;
        this.productCode = productCode;
        this.price = price;
        this.discountAmount = discountAmount;
        this.productName = productName;
        this.validity = validity;
        this.cityName = cityName;
    }

    // Property accessors
    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name="upprouuid", unique=true, nullable=false, length=40)

    public String getUpprouuid() {
        return this.upprouuid;
    }

    public void setUpprouuid(String upprouuid) {
        this.upprouuid = upprouuid;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="provinceuuid")

    public ProvincialInformation getProvincialInformation() {
        return this.provincialInformation;
    }

    public void setProvincialInformation(ProvincialInformation provincialInformation) {
        this.provincialInformation = provincialInformation;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="operatoruid")

    public Operators getOperators() {
        return this.operators;
    }

    public void setOperators(Operators operators) {
        this.operators = operators;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="busuuid")

    public BusinessType getBusinessType() {
        return this.businessType;
    }

    public void setBusinessType(BusinessType businessType) {
        this.businessType = businessType;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="useruuid")

    public User getUser() {
        return this.user;
    }

    public void setUser(User user) {
        this.user = user;
    }

   @Column(name="product_name")
    public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	@Column(name="upfacevalue")

    public String getUpfacevalue() {
        return this.upfacevalue;
    }

    public void setUpfacevalue(String upfacevalue) {
        this.upfacevalue = upfacevalue;
    }

    @Column(name="discount")

    public BigDecimal getDiscount() {
        return this.discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    @Column(name="status", length=40)

    public String getStatus() {
        return this.status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Column(name="createtime", length=19)

    public Date getCreatetime() {
        return this.createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Column(name = "city_name", length = 20)
    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    @Column(name="modifytime", length=19)

    public Date getModifytime() {
        return this.modifytime;
    }

    public void setModifytime(Date modifytime) {
        this.modifytime = modifytime;
    }

    @Column(name="fastchargetype", length=40)

    public Integer getFastchargetype() {
        return this.fastchargetype;
    }

    public void setFastchargetype(Integer fastchargetype) {
        this.fastchargetype = fastchargetype;
    }

    @Column(name="upfailnum")

    public Integer getUpfailnum() {
        return this.upfailnum;
    }

    public void setUpfailnum(Integer upfailnum) {
        this.upfailnum = upfailnum;
    }

    @Column(name="uptimeinterva")

    public Integer getUptimeinterva() {
        return this.uptimeinterva;
    }

    public void setUptimeinterva(Integer uptimeinterva) {
        this.uptimeinterva = uptimeinterva;
    }

    @Column(name="remark", length=1000)

    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
//@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="upShopPro")
//
//    public Set<UpgameRecharge> getUpgameRecharges() {
//        return this.upgameRecharges;
//    }
//
//    public void setUpgameRecharges(Set<UpgameRecharge> upgameRecharges) {
//        this.upgameRecharges = upgameRecharges;
//    }
//@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="upShopPro")
//
//    public Set<UpProductLog> getUpProductLogs() {
//        return this.upProductLogs;
//    }
//
//    public void setUpProductLogs(Set<UpProductLog> upProductLogs) {
//        this.upProductLogs = upProductLogs;
//    }
//@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="upShopPro")
//
//    public Set<UpOrder> getUpOrders() {
//        return this.upOrders;
//    }
//
//    public void setUpOrders(Set<UpOrder> upOrders) {
//        this.upOrders = upOrders;
//    }
//


    @Column(name="product_code")
	public String getProductCode() {
		return productCode;
	}


	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}

	 @Column(name="price", precision=28, scale=5)
	public BigDecimal getPrice() {
		return price;
	}


	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	@Column(name="discount_amount", precision=28, scale=5)
	public BigDecimal getDiscountAmount() {
		return discountAmount;
	}


	public void setDiscountAmount(BigDecimal discountAmount) {
		this.discountAmount = discountAmount;
	}

	@Column(name="validity")
	public String getValidity() {
		return validity;
	}

	public void setValidity(String validity) {
		this.validity = validity;
	}

    @Column(name = "artificial")
    public Boolean getArtificial() {
        return artificial;
    }

    public void setArtificial(Boolean artificial) {
        this.artificial = artificial;
    }

    @Column(name = "press_order")
    public Boolean getPressOrder() {
        return pressOrder;
    }

    public void setPressOrder(Boolean pressOrder) {
        this.pressOrder = pressOrder;
    }

    @Column(name = "repeat_num")
    public Integer getRepeatNum() {
        return repeatNum;
    }

    public void setRepeatNum(Integer repeatNum) {
        this.repeatNum = repeatNum;
    }

    //	@Column(name="deduct")
//	public BigDecimal getDeduct() {
//		return deduct;
//	}
//
//
//	public void setDeduct(BigDecimal deduct) {
//		this.deduct = deduct;
//	}
//
//	@Column(name="deduct_amount")
//	public BigDecimal getDeductAmount() {
//		return deductAmount;
//	}


//	public void setDeductAmount(BigDecimal deductAmount) {
//		this.deductAmount = deductAmount;
//	}






}
